package portal.action.views;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class AdminAction {
	@RequestMapping(value="/fristpage",method=RequestMethod.GET)
	public String main(){
		return "firstpage/firstPage";
	}
		
	
	@RequestMapping(value="/views/log/list",method=RequestMethod.GET)
	public String logList(){		
		return "log/logList";
	}

	@RequestMapping(value="/views/log/detail",method=RequestMethod.GET)
	public String logDetail(String url,HttpServletRequest req){		
		req.setAttribute("url", url);
		return "log/logDetail";
	}
	@RequestMapping(value="/views/admin/storage",method=RequestMethod.GET)
	public String adminStorage(){		
		return "admin/adminStorage";
	}

	@RequestMapping(value="/views/admin/company",method=RequestMethod.GET)
	public String adminCompoany(){		
		return "admin/Company";
	}
	@RequestMapping(value="/views/admin/company/add",method=RequestMethod.GET)
	public String adminCompoanyAdd(){		
		return "admin/companyAdd";
	}
	@RequestMapping(value="/views/admin/company/update",method=RequestMethod.GET)
	public String adminCompoanyUpdate(String companyId,HttpServletRequest req){
		req.setAttribute("companyId", companyId);
		return "admin/companyUpdate";
	}
	@RequestMapping(value="/views/admin/algcategory",method=RequestMethod.GET)
	public String adminAlgCategory(){		
		return "admin/algCategory";
	}
	@RequestMapping(value="/views/admin/algcategory/update",method=RequestMethod.GET)
	public String adminAlgUpdate(String companyId,HttpServletRequest req){
		req.setAttribute("companyId", companyId);
		return "admin/algCategoryUpdate";
	}
	@RequestMapping(value="/views/admin/algcategory/add",method=RequestMethod.GET)
	public String adminAlgAdd(String companyId,HttpServletRequest req){
		req.setAttribute("companyId", companyId);
		return "admin/algCategoryAdd";
	}
	@RequestMapping(value="/views/admin/user/list",method=RequestMethod.GET)
	public String adminUserList(){
		return "admin/userList";
	}
	@RequestMapping(value="/views/admin/user/add",method=RequestMethod.GET)
	public String adminUserAdd(){
		return "admin/userAdd";
	}
	@RequestMapping(value="/views/admin/user/detail",method=RequestMethod.GET)
	public String adminUserDetail(String userId,HttpServletRequest req){
		req.setAttribute("userId", userId);
		return "admin/userDetail";
	}
	@RequestMapping(value="/views/admin/user/update",method=RequestMethod.GET)
	public String adminUserUpdate(String userId,HttpServletRequest req){
		req.setAttribute("userId", userId);
		return "admin/userUpdate";
	}

	@RequestMapping(value="/views/admin/character/list",method=RequestMethod.GET)
	public String adminCharacterList(){
		return "admin/characterList";
	}
	@RequestMapping(value="/views/admin/character/add",method=RequestMethod.GET)
	public String adminCharacterAdd(){
		return "admin/characterAdd";
	}
	@RequestMapping(value="/views/admin/character/update",method=RequestMethod.GET)
	public String adminCharacterUpdate(String characterId,HttpServletRequest req){
		req.setAttribute("characterId", characterId);
		return "admin/characterUpdate";
	}
}
